using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using CoastToCoast.Game;

namespace CoastToCoast.Client {
    public partial class GameCanvas : Canvas {
        public void Page_Loaded(object sender, EventArgs e) {
            Canvas rootCanvas = sender as Canvas;

            GameMatch game = new GameMatch();
            game.Start();

            Canvas mapCanvas = FindName("mapCanvas") as Canvas;
            mapCanvas.Background = new SolidColorBrush(Colors.Black);
            BoardView view = new BoardView(game.Board, mapCanvas);
            view.RenderBoard();

            TextBlock playerName = rootCanvas.FindName("PlayerName") as TextBlock;
            playerName.Text = game.Players[0].Name + "'s turn!";
        }
    }
}
